package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.AcowreviewDTO;
import com.lening.iot.po.AcowreviewPO;
import com.lening.iot.service.IAcowreviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 10:25
 */
@RestController
@RequestMapping("/acowreviews")
public class AcowreviewController extends BaseController<AcowreviewPO, AcowreviewDTO, IAcowreviewService> {
    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private IAcowreviewService iAcowreviewService;
    @GetMapping("/getAllAco")
    public Page<AcowreviewDTO> getAllAcl(Page<AcowreviewDTO> acowreviewdto){

        Page<AcowreviewDTO> acowreviewList = iAcowreviewService.getAllAco(acowreviewdto);
        return acowreviewList;
    }

//    @Override
//    public Page<?> page(AcowreviewDTO acowreviewDTO) {
//        return iAcowreviewService.getAllAco(acowreviewDTO);
//    }
@GetMapping("/getAll")
public List<AcowreviewDTO> getAll(String communityName) {
    List<AcowreviewDTO> acowList = iAcowreviewService.getAll(communityName);
    return acowList;
}
}
